package main

import (
	"encoding/json"
	"fmt"
	"github.com/ThinkiumGroup/web3.go/web3"
	"github.com/ThinkiumGroup/web3.go/web3/providers"
)

const (
	TmpKey     = "0xc614545a9f1d9a2eeda26836e42a4c11631f25dc3d0dcc37fe62a89c4ff293d1"
	TmpAddress = "0x5dfcfc6f4b48f93213dad643a50228ff873c15b9"
)

var (
	DefaultValue = "1" + "000000000000000000"
)

func init() {
	//Web3.Thk.DefaultPrivateKey = ""
}
func JsonFormat(obj interface{}) string {
	jsonStr, _ := json.MarshalIndent(obj, "", "\t")
	return string(jsonStr)
}

//func TestThkGetStats() {
//	stats, err := Web3.Thk.GetStats("1")
//	if err != nil {
//		fmt.Println(err.Error())
//	}
//
//	fmt.Printf("stats:%+v", stats)
//}

func main() {
	RpcHost := "https://bsc-testnet-rpc.publicnode.com"
	Web3 := web3.NewWeb3(providers.NewHTTPProvider(RpcHost, 10, false))
	Web3.Thk.DefaultAddress = "0x332922a2D84716C7b49636335c4C3B944b180E7c"
	Web3.Thk.DefaultChainId = "97"
	var response, _ = Web3.Thk.GetAccount("0x332922a2D84716C7b49636335c4C3B944b180E7c", "97")
	fmt.Println(response)

}

func t1() {

}
